180. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2023-07-12 04:42:43 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

180.1 Files compared

#LocationFileLast Modified
1Porto v4.0.5/Theme Files/Porto Theme/app/code/Smartwave/Megamenu/view/frontend/templates/onepagecategoryonepagecategory.phtml2023-03-15 02:54:01 +0000
2Porto v4.0.6/Theme Files/Porto Theme/app/code/Smartwave/Megamenu/view/frontend/templates/onepagecategoryonepagecategory.phtml2023-07-03 08:02:57 +0000

180.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged2376
Changed12
Inserted00
Removed00

180.3 Comparison options

WhitespaceConsecutive whitespace is treated as a single space
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersNot shown in the comparison detail
Active line-pairing rules

180.4 Active regular expressions

No regular expressions were active.

180.5 Comparison detail

1 <?php 1 <?php
2 /** 2 /**
3  * Copyright © 2018 Porto. All rights reserved. 3  * Copyright © 2018 Porto. All rights reserved.
4  */ 4  */
5  5 
6 ?> 6 ?>
7 <?php 7 <?php
8 /** 8 /**
9  * Top menu for store 9  * Top menu for store
10  * 10  *
11  * @see \Smartwave\Megamenu\Block\Topmenu 11  * @see \Smartwave\Megamenu\Block\Topmenu
12  */ 12  */
13 ?> 13 ?>
14 <?php 14 <?php
15     $_helper = $this->helper('Smartwave\Megamenu\Helper\Data'); 15     $_helper = $this->helper('Smartwave\Megamenu\Helper\Data');
16     $_portohelper = $this->helper('Smartwave\Porto\Helper\Data'); 16     $_portohelper = $this->helper('Smartwave\Porto\Helper\Data');
17  17 
18     $categories = $_helper->getFirstLevelCategories(); 18     $categories = $_helper->getFirstLevelCategories();
19     $_category_config = $_portohelper->getConfig('porto_settings/category'); 19     $_category_config = $_portohelper->getConfig('porto_settings/category');
20     $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid'); 20     $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid');
21  21 
22     $aspect_ratio = $this->getData("aspect_ratio"); 22     $aspect_ratio = $this->getData("aspect_ratio");
23     if($aspect_ratio == null) { 23     if($aspect_ratio == null) {
24         $aspect_ratio = $_category_config['aspect_ratio']; 24         $aspect_ratio = $_category_config['aspect_ratio'];
25     } 25     }
26     $ratio_width = $this->getData("image_width"); 26     $ratio_width = $this->getData("image_width");
27     if(!$ratio_width) { 27     if(!$ratio_width) {
28         $ratio_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300; 28         $ratio_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300;
29     } 29     }
30     $ratio_height = $this->getData("image_height"); 30     $ratio_height = $this->getData("image_height");
31     if(!$ratio_height) { 31     if(!$ratio_height) {
32         $ratio_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300; 32         $ratio_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300;
33     } 33     }
34  34 
35     $move_actions= $this->getData("move_actions"); 35     $move_actions= $this->getData("move_actions");
36     if(!$move_actions) 36     if(!$move_actions)
37         $move_actions = 0; 37         $move_actions = 0;
38     $lazy_owl = $this->getData("lazy_owl"); 38     $lazy_owl = $this->getData("lazy_owl");
39     if(!$lazy_owl) 39     if(!$lazy_owl)
40         $lazy_owl = 0; 40         $lazy_owl = 0;
41     $product_count = $this->getData("product_count"); 41     $product_count = $this->getData("product_count");
42     if(!$product_count) 42     if(!$product_count)
43         $product_count = 12; 43         $product_count = 12;
44     $columns = $this->getData("columns"); 44     $columns = $this->getData("columns");
45     if(!$columns) 45     if(!$columns)
46         $columns = "{0:{items:2},768:{items:3},992:{items:4},1200:{items:5}}"; 46         $columns = "{0:{items:2},768:{items:3},992:{items:4},1200:{items:5}}";
47  47 
48     $product_type = $this->getData("product_type"); 48     $product_type = $this->getData("product_type");
49     if($product_type == null) { 49     if($product_type == null) {
50         $product_type = $_category_grid_config['product_type']; 50         $product_type = $_category_grid_config['product_type'];
51     } 51     }
52     if($product_type == null) { 52     if($product_type == null) {
53         $product_type = 1; 53         $product_type = 1;
54     } 54     }
55  55 
56     $custom_styles='<style type="text/css">'; 56     $custom_styles='<style type="text/css">';
57 ?> 57 ?>
58 <div class="onepage-category"> 58 <div class="onepage-category">
59     <div class="category-list"> 59     <div class="category-list">
60         <ul> 60         <ul>
61         <?php 61         <?php
62             $i = 0; 62             $i = 0;
63             foreach($categories as $category) { 63             foreach($categories as $category) {
64                 $cat_id = $category->getId(); 64                 $cat_id = $category->getId();
65                 $cat_model = $_helper->getCategoryModel($cat_id); 65                 $cat_model = $_helper->getCategoryModel($cat_id);
66                 if($category->getIsActive() && !$cat_model->getData("sw_ocat_hide_this_item")) { 66                 if($category->getIsActive() && !$cat_model->getData("sw_ocat_hide_this_item")) {
67                     $icon = '<em class="porto-icon-circle-empty"></em>'; 67                     $icon = '<em class="porto-icon-circle-empty"></em>';
68                     if($cat_icon_img=$cat_model->getData("sw_ocat_category_icon_image")) { 68                     if($cat_icon_img=$cat_model->getData("sw_ocat_category_icon_image")) {
69                         $icon = '<img src="'.'catalog/category/'.$cat_icon_img.'" alt=""/>'; 69                         $icon = '<img src="'.'catalog/category/'.$cat_icon_img.'" alt=""/>';
70                     } else if($cat_font_icon=$cat_model->getData("sw_ocat_category_font_icon")){ 70                     } else if($cat_font_icon=$cat_model->getData("sw_ocat_category_font_icon")){
71                         $icon = '<em class="'.$cat_font_icon.'"></em>'; 71                         $icon = '<em class="'.$cat_font_icon.'"></em>';
72                     } 72                     }
73                     if($hover_bg_color = $cat_model->getData("sw_ocat_category_hoverbgcolor")) 73                     if($hover_bg_color = $cat_model->getData("sw_ocat_category_hoverbgcolor"))
74                         $custom_styles .= '.onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"]:hover,.onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"].active{background-color:'.$hover_bg_color.';}.onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"]:hover:after,.onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"].active:after{border-left-color:'.$hover_bg_color.';}'; 74                         $custom_styles .= '.onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"]:hover,.onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"].active{background-color:'.$hover_bg_color.';}.onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"]:hover:after,.onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"].active:after{border-left-color:'.$hover_bg_color.';}';
75                         $custom_styles .= '.rtl .onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"]:hover,.rtl .onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"].active{background-color:'.$hover_bg_color.';}.rtl .onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"]:hover:after,.rtl .onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"].active:after{border-right-color:'.$hover_bg_color.';border-left: none;}'; 75                         $custom_styles .= '.rtl .onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"]:hover,.rtl .onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"].active{background-color:'.$hover_bg_color.';}.rtl .onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"]:hover:after,.rtl .onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"].active:after{border-right-color:'.$hover_bg_color.';border-left: none;}';
76                         $custom_styles .= '@media(min-width: 768px){.page-wrapper {padding-left: 80px;padding-right: 0;}.rtl .page-wrapper {padding-right: 80px;padding-left: 0;}header.page-header.sticky-header .header-main {width: calc(100% - 80px) !important;left: 80px !important;right: auto !important;}.rtl header.page-header.sticky-header .header-main {width: calc(100% - 80px) !important;right: 80px !important;left: auto !important;}}'; 76                         $custom_styles .= '@media(min-width: 768px){.page-wrapper {padding-left: 80px;padding-right: 0;}.rtl .page-wrapper {padding-right: 80px;padding-left: 0;}header.page-header.sticky-header .header-main {width: calc(100% - 80px) !important;left: 80px !important;right: auto !important;}.rtl header.page-header.sticky-header .header-main {width: calc(100% - 80px) !important;right: 80px !important;left: auto !important;}}';
77                     echo '<li data-index="'.$i.'"><a href="javascript:void(0)" data-cat="'.$cat_id.'">'.$icon.'<span>'.$category->getName().'</span></a></li>'; 77                     echo '<li data-index="'.$i.'"><a href="javascript:void(0)" data-cat="'.$cat_id.'">'.$icon.'<span>'.$category->getName().'</span></a></li>';
78                     $i++; 78                     $i++;
79                 } 79                 }
80             } 80             }
81         ?> 81         ?>
82         </ul> 82         </ul>
83         <?php 83         <?php
84             $custom_styles .= '</style>'; 84             $custom_styles .= '</style>';
85             echo $custom_styles; 85             echo $custom_styles;
86         ?> 86         ?>
87     </div> 87     </div>
88     <div class="category-details"> 88     <div class="category-details">
89     <?php 89     <?php
90         foreach($categories as $category) { 90         foreach($categories as $category) {
91             $cat_id = $category->getId(); 91             $cat_id = $category->getId();
92             $cat_model = $_helper->getCategoryModel($cat_id); 92             $cat_model = $_helper->getCategoryModel($cat_id);
93             if($category->getIsActive() && !$cat_model->getData("sw_ocat_hide_this_item")) { 93             if($category->getIsActive() && !$cat_model->getData("sw_ocat_hide_this_item")) {
94                 $activeChildren = $_helper->getActiveChildCategories($cat_model); 94                 $activeChildren = $_helper->getActiveChildCategories($cat_model);
95                 $a_class = ''; 95                 $a_class = '';
96                 $popup = ''; 96                 $popup = '';
97                 if (count($activeChildren)) { 97                 if (count($activeChildren)) {
98                     $a_class = ' class="parent"'; 98                     $a_class = ' class="parent"';
99                     $popup = '<div class="menu-popup">'.$_helper->getSubmenuItemsHtml($activeChildren, 0, 2).'</div>'; 99                     $popup = '<div class="menu-popup">'.$_helper->getSubmenuItemsHtml($activeChildren, 0, 2).'</div>';
100                 } 100                 }
101  101 
102                 $title_menu = '<a href="javascript:void(0)" data-id="'.$cat_id.'"'.$a_class.'><span>'.$cat_model->getName().'</span></a>'.$popup; 102                 $title_menu = '<a href="javascript:void(0)" data-id="'.$cat_id.'"'.$a_class.'><span>'.$cat_model->getName().'</span></a>'.$popup;
103  103 
104                 $resultPage = $_helper->getResultPageFactory()->create(); 104                 $resultPage = $_helper->getResultPageFactory()->create();
105                 $products = $resultPage->getLayout()->createBlock('Smartwave\Filterproducts\Block\Home\LatestList') 105                 $products = $resultPage->getLayout()->createBlock('Smartwave\Filterproducts\Block\Home\LatestList')
106                     ->setTemplate('Smartwave_Megamenu::onepagecategory/products_area.phtml') 106                     ->setTemplate('Smartwave_Megamenu::onepagecategory/products_area.phtml')
107                     ->setData('category_id',$cat_id) 107                     ->setData('category_id',$cat_id)
108                     ->setData('aspect_ratio',$aspect_ratio) 108                     ->setData('aspect_ratio',$aspect_ratio)
109                     ->setData('image_width',$ratio_width) 109                     ->setData('image_width',$ratio_width)
110                     ->setData('image_height',$ratio_height) 110                     ->setData('image_height',$ratio_height)
111                     ->setData('lazy_owl',$lazy_owl) 111                     ->setData('lazy_owl',$lazy_owl)
112                     ->setData('product_count',$product_count) 112                     ->setData('product_count',$product_count)
113                     ->setData('columns',$columns) 113                     ->setData('columns',$columns)
114                     ->setData('product_type',$product_type) 114                     ->setData('product_type',$product_type)
115                     ->toHtml(); 115                     ->toHtml();
116  116 
117                 $additional_content = $_helper->getBlockContent($cat_model->getData("sw_ocat_additional_content")
);
 117                 $additional_content = $_helper->getBlockContent($cat_model->getData("sw_ocat_additional_content")?$cat_model->getData("sw_ocat_additional_content"):'');
118     ?> 118     ?>
119         <div id="category_<?php echo $cat_id; ?>" class="category-detail"> 119         <div id="category_<?php echo $cat_id; ?>" class="category-detail">
120             <div class="title-menu"><?php echo $title_menu; ?></div> 120             <div class="title-menu"><?php echo $title_menu; ?></div>
121             <div class="products-area"><?php echo $products; ?></div> 121             <div class="products-area"><?php echo $products; ?></div>
122             <div class="additional-content"><?php echo $additional_content; ?></div> 122             <div class="additional-content"><?php echo $additional_content; ?></div>
123         </div> 123         </div>
124     <?php 124     <?php
125             } 125             }
126         } 126         }
127     ?> 127     ?>
128     </div> 128     </div>
129     <script type="text/javascript"> 129     <script type="text/javascript">
130     require([ 130     require([
131         'jquery' 131         'jquery'
132     ], function ($) { 132     ], function ($) {
133         $(".category-detail > .title-menu > a.parent").off("click").on("click", function(e){ 133         $(".category-detail > .title-menu > a.parent").off("click").on("click", function(e){
134             if($(this).hasClass("opened")) { 134             if($(this).hasClass("opened")) {
135                 $(this).parent().children(".menu-popup").fadeOut(200); 135                 $(this).parent().children(".menu-popup").fadeOut(200);
136                 $(this).removeClass("opened"); 136                 $(this).removeClass("opened");
137             } else { 137             } else {
138                 $(this).addClass("opened"); 138                 $(this).addClass("opened");
139                 $(this).parent().children(".menu-popup").fadeIn(200); 139                 $(this).parent().children(".menu-popup").fadeIn(200);
140             } 140             }
141             e.stopPropagation(); 141             e.stopPropagation();
142         }); 142         });
143         $(".category-detail > .title-menu > a.parent").parent().click(function(e){ 143         $(".category-detail > .title-menu > a.parent").parent().click(function(e){
144             e.stopPropagation(); 144             e.stopPropagation();
145         }); 145         });
146         $("html,body").click(function(){ 146         $("html,body").click(function(){
147             $(".category-detail > .title-menu > a.parent").parent().children(".menu-popup").fadeOut(200); 147             $(".category-detail > .title-menu > a.parent").parent().children(".menu-popup").fadeOut(200);
148             $(".category-detail > .title-menu > a.parent").removeClass("opened"); 148             $(".category-detail > .title-menu > a.parent").removeClass("opened");
149         }); 149         });
150         $(".onepage-category .category-list > ul > li > a").off("click").on("click", function(){ 150         $(".onepage-category .category-list > ul > li > a").off("click").on("click", function(){
151             cat_id = $(this).attr("data-cat"); 151             cat_id = $(this).attr("data-cat");
152             $("#category_"+cat_id).scrollToMe(); 152             $("#category_"+cat_id).scrollToMe();
153             var cur_item = $(this); 153             var cur_item = $(this);
154             setTimeout(function(){ 154             setTimeout(function(){
155                 $(".onepage-category .category-list > ul > li > a").removeClass("active"); 155                 $(".onepage-category .category-list > ul > li > a").removeClass("active");
156                 $(cur_item).addClass("active"); 156                 $(cur_item).addClass("active");
157             },500); 157             },500);
158         }); 158         });
159         $(window).scroll(function(){ 159         $(window).scroll(function(){
160             $(".onepage-category .category-list > ul > li > a").each(function(){ 160             $(".onepage-category .category-list > ul > li > a").each(function(){
161                 if($("#category_"+$(this).attr("data-cat")).offset() && ($(window).scrollTop() >= $("#category_"+$(this).attr("data-cat")).offset().top - $(window).innerHeight() / 2) && ($(window).scrollTop() <= $("#category_"+$(this).attr("data-cat")).offset().top + $("#category_"+$(this).attr("data-cat")).height() - $(window).innerHeight() / 2)) { 161                 if($("#category_"+$(this).attr("data-cat")).offset() && ($(window).scrollTop() >= $("#category_"+$(this).attr("data-cat")).offset().top - $(window).innerHeight() / 2) && ($(window).scrollTop() <= $("#category_"+$(this).attr("data-cat")).offset().top + $("#category_"+$(this).attr("data-cat")).height() - $(window).innerHeight() / 2)) {
162                     $(this).addClass("active"); 162                     $(this).addClass("active");
163                     $(".onepage-category .category-list > ul > li > a:not([data-cat='"+$(this).attr("data-cat")+"'])").removeClass("active"); 163                     $(".onepage-category .category-list > ul > li > a:not([data-cat='"+$(this).attr("data-cat")+"'])").removeClass("active");
164                 } 164                 }
165             }); 165             });
166             if($(".onepage-category .category-list > ul").outerHeight() < $(this).innerHeight()) { 166             if($(".onepage-category .category-list > ul").outerHeight() < $(this).innerHeight()) {
167                 $(".onepage-category .category-list > ul").removeClass("fixed-bottom"); 167                 $(".onepage-category .category-list > ul").removeClass("fixed-bottom");
168                 if($(this).scrollTop() >= $(".onepage-category .category-list").offset().top - 24) { 168                 if($(this).scrollTop() >= $(".onepage-category .category-list").offset().top - 24) {
169                     $(".onepage-category .category-list > ul").addClass("fixed-top"); 169                     $(".onepage-category .category-list > ul").addClass("fixed-top");
170                 } else { 170                 } else {
171                     $(".onepage-category .category-list > ul").removeClass("fixed-top"); 171                     $(".onepage-category .category-list > ul").removeClass("fixed-top");
172                 } 172                 }
173             } else { 173             } else {
174                 $(".onepage-category .category-list > ul").removeClass("fixed-top"); 174                 $(".onepage-category .category-list > ul").removeClass("fixed-top");
175                 if($(this).scrollTop() >= $(".onepage-category .category-list").offset().top + $(".onepage-category .category-list > ul").outerHeight() + 46 - $(this).innerHeight()) { 175                 if($(this).scrollTop() >= $(".onepage-category .category-list").offset().top + $(".onepage-category .category-list > ul").outerHeight() + 46 - $(this).innerHeight()) {
176                     $(".onepage-category .category-list > ul").addClass("fixed-bottom"); 176                     $(".onepage-category .category-list > ul").addClass("fixed-bottom");
177                 } else { 177                 } else {
178                     $(".onepage-category .category-list > ul").removeClass("fixed-bottom"); 178                     $(".onepage-category .category-list > ul").removeClass("fixed-bottom");
179                 } 179                 }
180             } 180             }
181             if(($(".onepage-category .category-list > ul").hasClass("fixed-bottom") && ($(this).scrollTop() + $(window).innerHeight() >= $(".page-footer").offset().top)) || ($(".onepage-category .category-list > ul").hasClass("fixed-top") && ($(this).scrollTop() + $(window).innerHeight() >= $(".page-footer").offset().top) && ($(".onepage-category .category-list > ul").offset().top + $(".onepage-category .category-list > ul").outerHeight() >= $(".page-footer").offset().top) && ($(this).scrollTop() + $(".onepage-category .category-list > ul").outerHeight() + 70 >= $(".page-footer").offset().top))) { 181             if(($(".onepage-category .category-list > ul").hasClass("fixed-bottom") && ($(this).scrollTop() + $(window).innerHeight() >= $(".page-footer").offset().top)) || ($(".onepage-category .category-list > ul").hasClass("fixed-top") && ($(this).scrollTop() + $(window).innerHeight() >= $(".page-footer").offset().top) && ($(".onepage-category .category-list > ul").offset().top + $(".onepage-category .category-list > ul").outerHeight() >= $(".page-footer").offset().top) && ($(this).scrollTop() + $(".onepage-category .category-list > ul").outerHeight() + 70 >= $(".page-footer").offset().top))) {
182                 $(".onepage-category .category-list > ul").addClass("absolute-bottom"); 182                 $(".onepage-category .category-list > ul").addClass("absolute-bottom");
183             } else { 183             } else {
184                 $(".onepage-category .category-list > ul").removeClass("absolute-bottom"); 184                 $(".onepage-category .category-list > ul").removeClass("absolute-bottom");
185             } 185             }
186         }); 186         });
187     }); 187     });
188     </script> 188     </script>
189 </div> 189 </div>